/*
编写 : Hexh
时间 : 2012-6-13 16:02:26
*/
using System;
using System.Collections.Generic;
using FsCarInfo.Core.Entity;
using FsCarInfo.Core.Entity.IRespositories;
using HMIS.FrameWork;
using HMIS.FrameWork.DomainBase;

namespace FsCarInfo.Facade.Impl
{
	/// <summary>
	///	 the impl of IFsCartransferFacade
	/// </summary>
	public class FsCartransferFacadeImpl : IFsCartransferFacade
	{

		private readonly IFsCartransferRepository FsCartransferRepository;

		public FsCartransferFacadeImpl(IFsCartransferRepository FsCartransferRepository)
        {
			this.FsCartransferRepository = FsCartransferRepository;
        }

        #region IFsCartransfer Entity Save,Get,Update,Delete

		public FsCartransfer Get(string id)
		{
			return FsCartransferRepository.Get(id);
		}

		public FsCartransfer Load(string id)
		{
			return FsCartransferRepository.Load(id);
		}

		public void SaveOrUpdate(FsCartransfer entity)
		{
			this.FsCartransferRepository.SaveOrUpdate(entity);
		}

		public void Delete(string id)
		{
			FsCartransferRepository.Delete(id);
		}
		
		public void PhysicsDelete(string id)
		{
			FsCartransferRepository.PhysicsDelete(id);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return FsCartransferRepository.IsFieldExist(fieldName, fieldValue, id);
		}
		
		public bool IsFieldExistWhere(string fieldName, string fieldValue, string id, string where)
		{
			return FsCartransferRepository.IsFieldExistWhere(fieldName, fieldValue, id, where);
		}
		
		#endregion
		
		#region Query 

		public IList<FsCartransfer> GetAll()
		{
			return FsCartransferRepository.GetAll();
		}

		public IList<FsCartransfer> GetPlist(string state, string type, string deptId, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
        {
			return FsCartransferRepository.GetPlist(state, type, deptId, start, limit, sort, dir, filters, out total);
        }
		
		#endregion
	}
}
